import { MutationTree } from "vuex";
import { Istate } from "../../interface";
import * as types from './mutation-types';

const mutations: MutationTree<Istate> = {
  [types.SET_U](state, n) {
    state.user = n
  },
  [types.SET_USERS](state, n) {
    state.users = n
  },
  [types.SET_ACTIVITY](state, n) {
    state.activity = n
  },
  [types.SET_ARTICLE](state, n) {
    state.article = n
  },
  [types.SET_QUESTION](state, n) {
    state.question = n
  },
  [types.SET_QUESTIONBANK](state, n) {
    state.questionbank = n
  },
  [types.SET_LABEL](state, n) {
    state.label = n
  },
  [types.SET_TEAM](state, n) {
    state.team = n
  },
  [types.SET_NOTICE](state, n) {
    state.notice = n
  },
  ['science'](state, n) {
    state.science = !!n
  },
  ['time'](state, n) {
    state.time = n
  },
  [types.SET_MY_PRACTISE_QUESTION](state, n) {
    state.myPractiseQuestion = n
  },
}

export default mutations